/*
 * Copyright (C) 2010-2011 Comcast Cable.  All Rights Reserved.
 */
package com.hercules.android.receiver.handlers.commands;

import com.hercules.android.receiver.AndroidReceiver;
import com.hercules.android.receiver.model.commands.XRECommand;

/**
 * This interface defines the contract for auxiliary processing of command.
 * <p>
 * <b>Thread Safety:</b> Implementation should be thread safe or work in a thread safe manner.
 *
 * @author liuliquan, 7realm
 * @version 1.0
 */
public interface AuxiliaryXRECommandHandler {
    /**
     * Process given command message.
     *
     * @param command the XRE command to be processed
     * @param receiver the receiver for the XRE application
     * @throws IllegalArgumentException if given command or receiver is null
     * @throws XRECommandHandlerException if any error occurs while processing the command
     */
    void processCommandMessage(XRECommand command, AndroidReceiver receiver) throws XRECommandHandlerException;
}